package com.rui.proxy.model;

import com.rui.proxy.obj.GuangzhouTrainStation;
import com.rui.proxy.obj.TrainStation;

/**
 * 代售点卖票（静态代理类）
 *
 * @author Administrator
 */
public class StaticProxyPoint implements TrainStation {

    private GuangzhouTrainStation station = new GuangzhouTrainStation();

    /**
     * 卖票
     *
     * @param null
     * @return void
     * @author ZhangRui
     * @date 2023/3/2 15:27
     */
    @Override
    public void sellTickets() {

        this.collectionCharge();

        station.sellTickets();
    }

    @Override
    public void refund() {
        station.refund();
    }

    /**
     * 代理类其他处理
     *
     * @return void
     * @author ZhangRui
     * @date 2023/3/2 15:26
     */
    private void collectionCharge() {
        System.out.println("代售加收5%手续费");
    }
}